package com.training.iyogo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.training.iyogo.dao.IVIPDAO;
import com.training.iyogo.domain.VIP;
import com.training.iyogo.service.IVIPService;
@Service
@Transactional
public class VIPService implements IVIPService{
	@Autowired
	private IVIPDAO vipDao;

	@Override
	public void addVIP(VIP vip) {
		vipDao.save(vip);
	}

	@Override
	public VIP getByName(String name) {
		return vipDao.findByName(name);
	}

	@Override
	public void updateVIP(VIP vip) {
		vipDao.update(vip);
	} 
	

}
